<?php
/**
 * @package		JA News Component
 * @license		GNU/GPL, see LICENSE.php
 */

jimport('joomla.application.component.controller');

class JanewsController extends JController
{
	/**
	 * Method to display the view
	 *
	 * @access	public
	 */
	function display()
	{
		$view = JRequest::getCmd('view');
		if ($view == 'section') {
		  $view = "janews";
		  JRequest::setVar('show',1);
		}elseif ($view=='category'){
		  $view = "janews";
		  JRequest::setVar('display','category');
		  JRequest::setVar('view', $view );
  		JRequest::setVar('layout', 'default');
  		parent::display();
		}
		
		JRequest::setVar('view', $view );
		JRequest::setVar('layout', 'default');
		parent::display();
	}
}
?>
